# Copyright (C) 2006 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.
#
# Author:  Andreas Waechter           IBM    2006-04-13

########################################################################
#                      unitTest for CoinUtils                          #
########################################################################

noinst_PROGRAMS = unitTest

unitTest_SOURCES = \
	CoinLpIOTest.cpp \
	CoinDenseVectorTest.cpp \
	CoinErrorTest.cpp \
	CoinIndexedVectorTest.cpp \
	CoinMessageHandlerTest.cpp \
	CoinModelTest.cpp \
	CoinMpsIOTest.cpp \
	CoinPackedMatrixTest.cpp \
	CoinPackedVectorTest.cpp \
	CoinRationalTest.cpp \	
	CoinShallowPackedVectorTest.cpp \
	unitTest.cpp

# List libraries to link into binary
unitTest_LDADD = ../src/libCoinUtils.la $(COINUTILSTEST_LFLAGS)

# Here list all include flags, relative to this "srcdir" directory.
AM_CPPFLAGS = -I$(srcdir)/../src $(COINUTILSTEST_CFLAGS)

# Libtool flags
AM_LDFLAGS = $(LT_LDFLAGS)

unittestflags =
if COIN_HAS_SAMPLE
  unittestflags += -mpsDir=`$(CYGPATH_W) $(SAMPLE_DATA)`
endif
if COIN_HAS_NETLIB
  unittestflags += -netlibDir=`$(CYGPATH_W) $(NETLIB_DATA)` -testModel=adlittle.mps
endif

test: unitTest$(EXEEXT)
	./unitTest$(EXEEXT) $(unittestflags)

.PHONY: test

########################################################################
#                          Cleaning stuff                              #
########################################################################

# Here we list everything that is not generated by the compiler, e.g.,
# output files of a program

CLEANFILES = byColumn.mps byRow.mps CoinMpsIoTest.mps string.mps CoinLpIoTest.lp
